/*
 * @Author: your name
 * @Date: 2021-12-24 10:57:14
 * @LastEditTime: 2021-12-24 13:54:01
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \day12 ts 路由 月考\my-app\src\component\Item.tsx
 */
import React, { Component } from 'react'

import {ListItem} from "../store/store.d"

import ones from "./ones.module.scss"

interface IProps{
    item:ListItem
}

export default class Item extends Component<IProps> {
    render() {
        let {item}=this.props
        return (
            <div className={ones.item}>
                <dl className={ones.item_con}>
                    <dt><img alt="" src={item.img}/></dt>
                    <dd>
                        <b>{item.name}</b>
                        <p>{item.title}</p>
                        <p>{item.price}</p>
                    </dd>
                </dl>
            </div>
        )
    }
}
